#include "GameOverScene.h"

void GameOverScene::Init(){
	imgFondo.CopyScreen(const_cast<sf::RenderWindow &>(theEngine.GetRenderWindow()));
	fondo.SetImage(imgFondo);
	fondo.FlipY(true);
	fondo.SetColor(sf::Color(255, 255, 255, 100));
	
	gameOverText.SetSize(50);
	gameOverText.SetText("GAME OVER");
	gameOverText.SetCenter(gameOverText.GetRect().GetWidth()/2, gameOverText.GetRect().GetHeight()/2);
	gameOverText.SetPosition(320, 240);
	gameOverText.SetColor(sf::Color(255, 255, 255));
}
void GameOverScene::Cleanup(){}
void GameOverScene::ProcessEvent(const sf::Event &e){
	if(e.Type == sf::Event::KeyPressed || e.Type == sf::Event::MouseButtonPressed){
		EndScene();
	}
}
void GameOverScene::Update(const float &dt){
}

void GameOverScene::Render(sf::RenderWindow &w){
	w.Clear(sf::Color::Black);
	w.Draw(fondo);
	w.Draw(gameOverText);
}

